package com.shlh.saas.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.apache.ibatis.type.Alias;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 用户余额实体类，对应数据库user_balances表
 */
@TableName("user_balances")
@Data
public class UserBalance {
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    /**
     * 用户手机号，关联users表
     */
    @TableField("phone")
    private String phone;
    
    /**
     * 用户ID，关联users表的id字段
     */
    @TableField("user_id")
    private Long userId;
    
    /**
     * 会员等级
     */
    @TableField("vip_level")
    private Integer vipLevel;
    
    /**
     * VIP到期时间
     */
    @TableField("vip_expire_time")
    private LocalDateTime vipExpireTime;
    
    /**
     * 现金余额
     */
    @TableField("cash_balance")
    private BigDecimal cashBalance;
    
    /**
     * 剩余导出次数
     */
    @TableField("export_quota_remaining")
    private Integer exportQuotaRemaining;
    
    /**
     * 剩余可查看记录数
     */
    @TableField("view_records_remaining")
    private Integer viewRecordsRemaining;
    
    /**
     * 剩余反查次数
     */
    @TableField("reverse_lookup_remaining")
    private Integer reverseLookupRemaining;
    
    /**
     * 剩余邮件发送次数
     */
    @TableField("email_send_remaining")
    private Integer emailSendRemaining;
    
    /**
     * 邮件套餐等级
     */
    @TableField("email_package_level")
    private Integer emailPackageLevel;
    
    /**
     * 邮件套餐过期时间
     */
    @TableField("email_package_expire_time")
    private LocalDateTime emailPackageExpireTime;
    
    /**
     * 创建时间
     */
    @TableField("created_at")
    private LocalDateTime createdAt;
    
    /**
     * 更新时间
     */
    @TableField("updated_at")
    private LocalDateTime updatedAt;

} 